// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 添加解决方案详情 */
export async function createSolution(options) {
  return request<{
    data;
  }>('/api/mjHomeSolution/add', {
    method: 'POST',
    data:(options || {}),
  });
}

/** 删除解决方案详情 */
export async function deleteSolution(options) {
    return request<{
      data;
    }>('/api/mjHomeSolution/delete', {
      method: 'POST',
      params:(options || {}),
    });
  }
  
  /** 新闻列表 */
export async function fetchSolutionList(options) {
  console.log(options,'option')
   const result = await request('/api/mjHomeSolution/queryBySolutionId', {
      method: 'POST',
      data: options,
    });
    return { data: result.data, success: true,total:result.total }
  }
  
  
export async function updateSolution(options) {
    console.log(options)
    return request<{
      data;
    }>('/api/mjHomeSolution/edit', {
      method: 'POST',
      data:(options || {}),
    });
  }








  export async function mjSolution() {
    const res = await  request<{
        data;
      }>('/api/mjSolution', {
        method: 'GET',
        data:( {}),
      });
      return res
    
}

//添加产品接口
export async function addSolution(options) {
    return request<{
      data;
    }>('/api/mjSolution/add', {
      method: 'POST',
      data:(options || {}),
    });
  }
  // 修改产品
  export async function editSolution(options) {
    return request<{
      data;
    }>('/api/mjSolution/edit', {
      method: 'POST',
      data:(options || {}),
    });
  }
    // 删除产品
    export async function removrSolution(options) {
      return request<{
        data;
      }>('/api/mjSolution/delete', {
        method: 'POST',
        params:(options || {}),
      });
    }
